Repository navigation
[3.13] gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) - #160201
Conversation
…honGH-159916) test_strings() gets gdb.host_charset(), but fails if gdb writes anything to stderr. For example, it fails if gdb logs the warning: "/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory." Even if stdout contains the expected encoding ("UTF-8"). Change test_gdb to only fail if stdout is empty, ignore stderr otherwise to ignore gdb warnings. (cherry picked from commit 88d922a) Co-authored-by: Victor Stinner <vstinner@python.org>
|
@Yhg1s: The 3.13 branch only accept security fixes. But the 3.13 branch is marked as "unreleasable" because test_gdb fails on a Tier-1 buildbot (AMD64 Debian root 3.13). Do you accept fixes to repair the 3.13 buildbots? |
|
Also failing on:
ERROR: test_strings (test.test_gdb.test_pretty_print.PrettyPrintTests.test_strings)
Verify the pretty-printing of unicode strings
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/buildarea/3.12.angelico-debian-amd64/build/Lib/test/test_gdb/test_pretty_print.py", line 120, in test_strings
raise RuntimeError(
RuntimeError: unable to determine the Python locale preferred encoding of embedded Python in GDB
stdout='UTF-8\n'
stderr="/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory.\n"
---------------------------------------------------------------------- |
|
Thanks @miss-islington for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
|
Thanks @miss-islington for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
|
Sorry, @miss-islington and @Yhg1s, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
Sorry, @miss-islington and @Yhg1s, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-160650 is a backport of this pull request to the 3.12 branch. |
|
GH-160651 is a backport of this pull request to the 3.11 branch. |
…-159916) (GH-160201) (#160650) gh-159914: Ignore gdb stderr in test_gdb.test_pretty_print (GH-159916) test_strings() gets gdb.host_charset(), but fails if gdb writes anything to stderr. For example, it fails if gdb logs the warning: "/usr/bin/gdb: warning: Couldn't determine a path for the index cache directory." Even if stdout contains the expected encoding ("UTF-8"). Change test_gdb to only fail if stdout is empty, ignore stderr otherwise to ignore gdb warnings. (cherry picked from commit 88d922a) (cherry picked from commit d9b6c22) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
test_strings() gets gdb.host_charset(), but fails if gdb writes
anything to stderr. For example, it fails if gdb logs the warning:
Even if stdout contains the expected encoding ("UTF-8").
Change test_gdb to only fail if stdout is empty, ignore stderr
otherwise to ignore gdb warnings.
(cherry picked from commit 88d922a)
Co-authored-by: Victor Stinner vstinner@python.org